import Mock from '../../mockjs/dist/mock-min.js';

let cart = [{
		key: "/cart/all",
		method: "get",
		param: {
			clientId: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA|5-7': [{
					id: "@increment(1)",
					"count|1-3": /[1-9]/,
					product: {
						id: "@increment(1)",
						'name': '八角亭 【5饼*提】2021年诚系列冰岛古树普洱生茶叶礼盒黎明茶厂',
						'category': '[{"id":"1","name":"普洱茶"},{"id":"2","name":"生茶"},{"id":"3","name":"冰岛古树"}]',
						'price|2-6': /[1-9]/,
						cover: "http://www.yanyucha.com/vancheerfile/images/2022/6/2022062010270074.jpg",
						'stock|1-2': /[1-9]/,
					},
				}]
			});
		},
	},
	{
		key: "/cart/info",
		method: "post",
		param: {
			productId: 0,
			count: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	},
	{
		key: "/cart/info",
		method: "put",
		param: {
			id: 0,
			count: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	},
	{
		key: "/cart/info",
		method: "delete",
		param: {
			id: 0,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {}
			});
		},
	}
];

export default cart;
